package com.vhall.component.entity.vote;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 投票信息表
 * </p>
 *
 * @author longzhen.gong
 * @date 2021/7/6 13:49
 */
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@TableName("votes")
public class VotesEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "vote_id", type = IdType.INPUT)
    private Long voteId;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 业务端扩展字段
     */
    @TableField("extend")
    private String extend;

    /**
     * 用户id
     */
    @TableField("account_id")
    private Integer accountId;

    /**
     * 应用id
     */
    @TableField("app_id")
    private String appId;

    /**
     * 是否是公开投票，1是0否，默认是
     */
    @TableField("is_public")
    private Integer isPublic;

    /**
     * 来源id
     */
    @TableField("source_id")
    private String sourceId;

    /**
     * 投票限时时长 默认0 为不限时
     */
    @TableField("limit_time")
    private Integer limitTime;

    /**
     * 可选选项数量 默认单选
     */
    @TableField("option_num")
    private Integer optionNum;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @TableField("deleted_at")
    private LocalDateTime deletedAt;


}
